<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<#import "/page.ftl" as page />
	<link rel="stylesheet" type="text/css" href="/css/work_report.css">
	<link rel="stylesheet" type="text/css" href="/css/calendar.css">
	<script type="text/javascript" src="/js/calendar.js"></script>
	<#include "/head.ftl"/>
	<div class="content">
		<div class="tab">
			<div class="tab-header">
				<a href="/calendar/addcalendar" title="新增日程" class="btn btn-setting btn-add" id="add"> <i class="iconfont icon-add"
					style="font-size: 16px;"></i>
				</a>
				<a title="刷新" class="btn btn-setting" onclick="refresh(this)">
					<i class="iconfont icon-refresh"></i>
				</a>
				<div class="tab-tool">
					<input class="name" type="text" placeholder="标题查找...">
					<a class="search-btn">
						<i class="iconfont icon-search"></i>
					</a>

				</div>
			</div>
			<div class="tab-content">
				<div>
					<table style="width: 100%; border-collapse: collapse;">
						<tr>
							<th>序号</th>
							<th>标题</th>
							<th>开始时间</th>
							<th>结束时间</th>
							<th>状态</th>
							<th class="tab-setting">操作</th>
						</tr>
						<#if !((sm.content)?size gt 0)>
							<tr><td colspan="6">您没有安排日程噢~快去 <a  href="/calendar/addcalendar" title="新增日程" style="text-decoration: underline;"> 添加日程 </a></tr>
						</#if>
							<#list (sm.content) as s>
							<tr>
								<td>${s.smId}</td>
								<td>${s.smTitle}</td>
								<td>${s.smStartTime?string("yyyy-MM-dd HH:mm:ss")}</td>
								<td>${s.smEndTime?string("yyyy-MM-dd HH:mm:ss")}</td>
								<#list status['scedule_manage'] as status>
									<#if status.value==s.smStatus>
										<td><span style="font-weight: 600;background:${(status.color)!''}"  class="btn">${status.name}</span></td>		
									</#if>
								</#list>
								<td>
									<a onclick="op('/calendar/op?id=${s.smId}')" class="btn btn-update"><i class="iconfont icon-brush"></i><span> 修改</span></a>
									<a onclick="sees('/calendar/checkcalendar?id=${s.smId}')" class="btn btn-look"><i class="iconfont icon-search"></i><span> 查看</span></a>
									<a onclick="dele(${s.smId})" class="btn btn-delete"><i class="iconfont icon-trash"></i><span> 删除</span></a>
									
								</td>
							</tr>
							</#list>
					</table>
				</div>
			</div>
			<@page.page url=requestURI pager=sm/>
		</div>

	</div>
</body>
</html>